import request from '@/utils/request'

// // 查询线索池信息列表
// export function listCluePool(query) {
//   return request({
//     url: '/business/cluePool/list',
//     method: 'get',
//     params: query
//   })
// }
//
// // 查询线索池信息详细
// export function getCluePool(cluePoolId) {
//   return request({
//     url: '/business/cluePool/' + cluePoolId,
//     method: 'get'
//   })
// }
//
// // 新增线索池信息
// export function addCluePool(data) {
//   return request({
//     url: '/business/cluePool',
//     method: 'post',
//     data: data
//   })
// }
//
// // 修改线索池信息
// export function updateCluePool(data) {
//   return request({
//     url: '/business/cluePool',
//     method: 'put',
//     data: data
//   })
// }
//
// // 删除线索池信息
// export function delCluePool(cluePoolId) {
//   return request({
//     url: '/business/cluePool/' + cluePoolId,
//     method: 'delete'
//   })
// }

// 查询线索池信息列表
export function listCluePoolByEnterprise(params) {
  return request({
    url: '/enterprise/cluePool/cluePool/list',
    method: 'get',
    params: params
  })
}

// 统计公客和私客线索池数量
export function countCluePoolType(params) {
  return request({
    url: '/enterprise/cluePool/cluePool/statisticsType',
    method: 'get',
    params: params
  })
}


// 统计线索池状态数量
export function countCluePoolStatus(params) {
  return request({
    url: '/enterprise/cluePool/cluePool/statisticsState',
    method: 'get',
    params: params
  })
}


// 查询线索池信息详情（路径上传线索池id）
export function getCluePool(cluePoolId) {
  return request({
    url: '/enterprise/cluePool/cluePool/' + cluePoolId,
    method: 'get'
  })
}


// 新增线索池跟进记录
export function addCluePoolRecord(data) {
  return request({
    url: '/enterprise/cluePool/record',
    method: 'post',
    data: data
  })
}


// 新增线索池信息
export function addCluePool(data) {
  return request({
    url: '/enterprise/cluePool/cluePool',
    method: 'post',
    data: data
  })
}

// 编辑和激活客户线索池信息
export function updateCluePool(data) {
  return request({
    url: '/enterprise/cluePool/cluePool',
    method: 'put',
    data: data
  })
}

// 认领线索和转为公客
export function claimCluePool(data) {
  return request({
    url: '/enterprise/cluePool/cluePool/transition',
    method: 'put',
    data: data
  })
}

// 关闭线索池
export function closeCluePool(data) {
  return request({
    url: '/enterprise/cluePool/cluePool/close',
    method: 'put',
    data: data
  })
}

